package com.whl.cloud.fergn;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.whl.cloud.model.PermissionResult;
import com.whl.cloud.model.UserInfoResult;
import com.whl.cloud.model.UserPasswordCheckParam;

@FeignClient(value = "USER-SERVICE")
public interface UserCenter {

	@RequestMapping(value = "/permission/anonymous", method = RequestMethod.GET)
	public List<PermissionResult> anonymous();

	@RequestMapping(value = "/permission/authority", method = RequestMethod.GET)
	public List<PermissionResult> authority();

	@RequestMapping(value = "/permission//find-user-id", method = RequestMethod.GET)
	public List<String> findByUserId(@RequestParam(value = "userId") Long userId);

	@RequestMapping(value = "/user/load-by-account", method = RequestMethod.GET)
	public UserInfoResult loadUserByAccount(@RequestParam(value = "account") String account);

	@RequestMapping(value = "/user/check-password", method = RequestMethod.POST)
	public Boolean checkPassword(@RequestBody UserPasswordCheckParam param);

}
